add_executable(tst_qnodeinstantiator WIN32 MACOSX_BUNDLE
    ../../shared/util.cpp ../../shared/util.h
    stringmodel.h
    tst_quick3dnodeinstantiator.cpp
)
target_include_directories(tst_qnodeinstantiator PRIVATE
    ../../shared
)

target_compile_definitions(tst_qnodeinstantiator PRIVATE
    QT_QMLTEST_DATADIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/data\\\"
)

target_link_libraries(tst_qnodeinstantiator PRIVATE
    Qt${QT_VERSION_MAJOR}::3DCore
    Qt${QT_VERSION_MAJOR}::3DQuick
    Qt${QT_VERSION_MAJOR}::3DQuickPrivate
    Qt${QT_VERSION_MAJOR}::Core
    Qt${QT_VERSION_MAJOR}::CorePrivate
    Qt${QT_VERSION_MAJOR}::Gui
    Qt${QT_VERSION_MAJOR}::GuiPrivate
    Qt${QT_VERSION_MAJOR}::Test
)

if(MACOS)
    set_target_properties(tst_qnodeinstantiator PROPERTIES
        MACOSX_BUNDLE FALSE
    )
endif()

install(TARGETS tst_qnodeinstantiator
    BUNDLE DESTINATION .
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

# Consider using qt_generate_deploy_app_script() for app deployment if
# the project can use Qt 6.3. In that case rerun qmake2cmake with
# --min-qt-version=6.3.
